package panda.transaction.recovery;

import panda.log.BasicLogRecord;

public class StartRecord implements LogRecord {
	private int transactionNumber;

	public StartRecord(BasicLogRecord record) {
		transactionNumber = record.getInt();
	}
	
	public StartRecord(int transactionNumber) {
		this.transactionNumber = transactionNumber;
	}

	public void undo(int transactionNumber) {
	}

	public int writeToLog() {
		return logManager.append(new Object[] { START, transactionNumber });
	}

	public int getType() {
		return START;
	}

	public int getTransactionNumber() {
		return transactionNumber;
	}

}
